#include "qfish.h"

QFish::QFish(const QString & fileName,QGraphicsScene *scence):QpixmapItem(fileName,scence)
{
    setPos(50,150+qrand()%475);

}

void QFish::advance(int phase)
{
   if(mapToScene(0,0).y()<=0||mapToScene(0,0).x()>=1500)
    {
    setPos(50,100+qrand()%600);
    }
    int speed=qrand()%15;
    this->setPos(mapToScene(speed,-2));
}

void QFish::fish_death()
{
}
